:- ['tools.pro','globalConstraints.pro','pairwisegenerator.pro'].


/*
Minimize and ff heuristic
*/

problemSolving(FeaturesList,PrimitivesFeaturesList, Constraints, Name,TimeOut, OutputFileMatrix, OutputFileStats,Size) :-
        domain(FeaturesList,-1,0),
        callRec(Constraints),
        length(PrimitivesFeaturesList,SizeMat),
        matrice(M,SizeMat,Size),
        limitMatrix(M,PrimitivesFeaturesList),
        pairwiseGenerator(PrimitivesFeaturesList,M,PWCTRLST,RANKLST),
        callRec(PWCTRLST),
        contrainteFD(M,PrimitivesFeaturesList), 
        alldiffrec(RANKLST),
        flatten(RANKLST,Ilist),
        domain(Ilist,1,Size),
        maximum(Kn,Ilist),
        labeling([time_out(TimeOut,_),ff,minimize(Kn)],Ilist),
        write(' I : '), writeln(Kn),writeMat(OutputFileMatrix,M).
        

